﻿using DevExpress.ExpressApp.DC;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Xpo;
using EasyXaf.EntityDesigner.BusinessObjects;

namespace EasyXaf.EntityDesigner.BusinessObjects.Entities;

/// <summary>
/// EntityDesign
/// </summary>
[XafDefaultProperty(nameof(Oid))]
[DeferredDeletion(false)]
public partial class EntityDesign : BaseObject
{
	private double _left;
	private double _top;
	private Entity _entity;
	private DomainModel _domainModel;

	/// <summary>
	/// Left
	/// </summary>
	public double Left
	{
		get => _left;
		set => SetPropertyValue(nameof(Left), ref _left, value);
	}

	/// <summary>
	/// Top
	/// </summary>
	public double Top
	{
		get => _top;
		set => SetPropertyValue(nameof(Top), ref _top, value);
	}

	/// <summary>
	/// Entity
	/// </summary>
	[Association("EntityDesigns-Entity")]
	public Entity Entity
	{
		get => _entity;
		set => SetPropertyValue(nameof(Entity), ref _entity, value);
	}

	/// <summary>
	/// DomainModel
	/// </summary>
	[Association("EntityDesigns-DomainModel")]
	public DomainModel DomainModel
	{
		get => _domainModel;
		set => SetPropertyValue(nameof(DomainModel), ref _domainModel, value);
	}

	public EntityDesign(Session session)
		: base(session)
	{
	}
}
